package com.chenliang.provider.biz;


import com.chenliang.provider.service.GoodsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: sendRabbitMqMsg
 * @description:
 * @author: 陈亮
 * @create: 2022-05-05 21:04
 */
@RestController
@RequestMapping("/goods")
public class GoodsBiz {
    
    
    
    @Resource
    private GoodsService goodsService;


    /**
     * 测试发送消息的机制,confirm,return,以及消费者的ack机制
     */
    @GetMapping("/demo")
    public void  send(){
        goodsService.send();
    }


    /**
     * 测试消费端先流,生产者这边循环发消息
     */
    @GetMapping("/demo1")
    public void  send1(){
        goodsService.send1();
    }
}
